package com.lsy.on_line.zaixian.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ShiYuan
 * @since 2022-07-24
 */
@TableName("video_banner")
@ApiModel(value = "Banner对象", description = "轮播图")
public class Banner implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("跳转地址")
    private String url;

    @ApiModelProperty("图片地址")
    private String img;

    @JsonProperty("create_time")//将驼峰形式的取别名为下划线形式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//日期格式取别名需要转换格式 年月日时分秒 时区为东8区
    private LocalDateTime createTime;

    @ApiModelProperty("数字越小排越前")
    private Integer weight;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Banner{" +
            "id=" + id +
            ", url=" + url +
            ", img=" + img +
            ", createTime=" + createTime +
            ", weight=" + weight +
        "}";
    }
}
